<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>订单列表</title>
</head>
<body>
<h1>订单列表</h1>
<table border="1">
    <tr>
        <th>订单ID</th>
        <th>用户</th>
        <th>总金额</th>
        <th>状态</th>
        <th>操作</th>
    </tr>
    <tr th:each="order : ${orders}">
        <td th:text="${order.id}"></td>
        <td th:text="${order.user.username}"></td>
        <td th:text="${order.totalAmount}"></td>
        <td th:text="${order.status}"></td>
        <td>
            <a th:href="@{'/orders/edit/' + ${order.id}}">编辑</a>
            <a th:href="@{'/orders/delete/' + ${order.id}}">删除</a>
        </td>
    </tr>
</table>
<a href="/orders/add">添加新订单</a>
</body>
</html>
